package com.kgc.easyshopping.dao;

import com.kgc.easyshopping.entity.Product;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProductMapper {
    //逻辑删除，只更改isDelete的值，不删除数据
    int deleteByPrimaryKey(Integer pid);

    int insert(Product record);

    int insertSelective(Product record);

    /**
     * 管理员商品分页
     * @return
     */
    List<Product> adminSelectByProduct(Map<String,Object> params);

    int adminProductTotal(Map<String,Object> params);

    Product selectByPrimaryKey(Integer pid);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);
}